//
//  Items.m
//  __PRODUCTNAME__
//
//  Created by dllo on 16/08/28
//  Copyright (c) dllo. All rights reserved.
//

#import "Items.h"
#import "Photo.h"

@implementation Items
- (void)setValue:(id)value forKey:(NSString *)key {
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"PhotoList"]) {
        NSMutableArray *photoList = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            Photo *photo = [Photo modelWithDic:dic];
            [photoList addObject:photo];
        }
        _PhotoList = photoList;
    }
}
@end
